package cn.sjx.basic.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BasicQuery {
    private Integer pageSize=10;
    private Integer currentPage=1;

    private String keyword="";
    //获取查询起始页数,通过getXxx,传一个对象参数时mybatis会自动识别
    public Integer getStart() {
        return (currentPage -1) * pageSize;
    }
}
